import React, { Component } from "react";
import { View } from "react-native";
import { Picker, List, Provider } from "@ant-design/react-native";
import Button from "components/Button";

import data from "./data";

import styles from "./styles";

// const { height } = Dimensions.get("window");

// const seasons = [
//   [
//     {
//       label: "2013",
//       value: "2013",
//     },
//     {
//       label: "2014",
//       value: "2014",
//     },
//   ],
//   [
//     {
//       label: "春",
//       value: "春",
//     },
//     {
//       label: "夏",
//       value: "夏",
//     },
//   ],
// ];

class Photo extends Component {
  constructor(props) {
    super(props);
    this.state = {
      value: [],
    };
    this.onChange = value => {
      this.setState({
        value,
      });
    };
  }

  render() {
    const { value } = this.state;
    return (
      <Provider>
        <View style={styles.root}>
          <Button onPress={this.localOnClick}>Click</Button>
          {/* <PickerView
            onChange={this.onChange}
            value={value}
            data={seasons}
            cascade={false}
          /> */}
          <List>
            <Picker data={data} cols={2} value={value} onChange={this.onChange}>
              <List.Item arrow="horizontal" onPress={this.onPress}>
                省市选择
              </List.Item>
            </Picker>
          </List>
        </View>
      </Provider>
    );
  }
}

export default Photo;
